#include "zos_config.h"

#ifdef BOARD_USING_I2C_OLED

#include  "zos.h"
#include "oled.h"

/**
 * @brief 任务线程
 */
int demo_oled(int argc, char *argv[])
{
	int i;
	oled_init();
	oled_dis_16x16_string(0,0,"欢迎使用QS-100");
	nb_get_SIM_TYPE(&i);
	if(i == NB_SIM_TYPE_MOBILE)
	{
		oled_dis_16x16_string(2,0,"SIM:中国移动");
	}
	else if(i == NB_SIM_TYPE_TELECOM)
	{
		oled_dis_16x16_string(2,0,"SIM:中国电信");
	}
	else if(i == NB_SIM_TYPE_UNICOM)
	{
		oled_dis_16x16_string(2,0,"SIM:中国联通");
	}
	oled_dis_16x16_string(4,0,"电压:%dmV",zos_adc_read(ZOS_ADC_BUS_VBAT));
	return ZOS_EOK;
}

#include "shell.h"

SHELL_EXPORT_CMD(demo_oled,demo_oled, oled demo);
#endif

